package com.atguigu.gulimall.search.vo;

import com.atguigu.common.to.es.SkuEsModel;
import lombok.Data;

import java.util.ArrayList;
import java.util.List;

/**
 * 查询的返回结果
 */
@Data
public class SearchResult {
    /**
     * 查询到的商品信息
     */
    private List<SkuEsModel> products;

    private Integer pageNum; //当前页码

    private Long total;//总记录

    private Integer totalPages;//总页码

    private List<BrandVo> brands;//查询结果可能涉及到的所有品牌

    private List<AttrVo> attrs;  //查询结果可能涉及到的所有属性

    private List<CatalogVo> catalogs;//可能涉及到的分类

    private List<Object> navs = new ArrayList<>();

    //导航面包屑
    @Data
    public static class NavVo{
        private String navName;
        private String navValue;
        private String link;
    }

    @Data
    public static class BrandVo{
        private Long brandId;
        private String brandName;
        private String brandImg;
    }

    @Data
    public static class AttrVo{
        private Long attrId;//属性Id
        private String attrName;//属性名称   操作系统
        private List<String> attrValue;//属性可能的值  安卓 ios
    }

    @Data
    public static class CatalogVo{
        private Long catalogId;
        private String catalogName;
    }
}
